<?php
$start = explode(' ', microtime());
echo $start[1]. "<br/>";
set_time_limit(0);
$dir = './';
$handle = opendir($dir);
$i = 0;
$fs = "";
while (false !== $file = (readdir($handle))) {
	if ($file !== '.' && $file != '..'&&strpos($file,'.zip')===false) {
		echo $file . "<br/>";
		$fs .= $file . ",";
		$i++;
		if (strpos($file, '.') === false) {
		}
	}
}
closedir($handle);

//echo $fs;


//$fs = "360upload,admin,api,attachment,center,css,data,flash,highslide,image,images,install,language,Scripts,source,swfupload,template,theme,uc_client";
$f = explode(",", $fs);
include_once ('pclzip.lib.php');
$archive = new PclZip('all.zip');
$v_list = $archive->create($fs);
if ($v_list == 0) {
	die("Error : " . $archive->errorInfo(true));
}

$end = explode(' ', microtime());
echo $end[1];
echo "success";
?>	